//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.until;

import com.tool.image.ImageMixDeal;
import com.tool.role.RoleData;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;

public class BabyUntil {
	public BabyUntil() {
	}

	public static void calculateBaby() {
		babyBirth();
	}

	public static void babyBirth() {
		String mesServer;
		if (RoleData.getRoleData().getLoginResult().getHavebaby() > 0) {
			RoleData.getRoleData().getLoginResult().setHavebaby(RoleData.getRoleData().getLoginResult().getHavebaby() - 500);
			if (RoleData.getRoleData().getLoginResult().getHavebaby() <= 0) {
				mesServer = Agreement.getAgreement().babyborn(" ");
				SendMessageUntil.toServer(mesServer);
				ImageMixDeal.userimg.Dialogue("生孩子啦！！！");
			}
		} else {
			mesServer = Agreement.getAgreement().babyborn(" ");
			SendMessageUntil.toServer(mesServer);
			ImageMixDeal.userimg.Dialogue("生孩子啦！！！");
		}

	}
}
